home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
333_02
/
p015.awk
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1989-04-21
|
253 b
|
15 lines
# interest1 - compute compound interest
# input: amount rate years
# output: compounded value at the end of each year
{
i = 1
while (i <= $3)
{
printf("Year %d\t%.2f\n", i, $1 * (1 + $2) ^ i)
i = i + 1
}
}